/*
 * CustomOrganizationsFrame.java
 *
 * Created on July 7, 2006, 11:22 AM
 */

package com.atlassian.uwc.ui.organizer;

import com.atlassian.uwc.ui.organizer.customorganizations.MakeParentHomePageOrganizer;

/**
 *
 * @author  brendan
 */
public class CustomOrganizationsFrame extends javax.swing.JFrame {

    /** Creates new form CustomOrganizationsFrame */
    public CustomOrganizationsFrame() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
    private void initComponents() {
        jPanel1 = new javax.swing.JPanel();
        makeHomePageParentButton = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        makeHomePageParentButton.setText("Make space home page parent of all parentless pages");
        makeHomePageParentButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                makeHomePageParentButtonActionPerformed(evt);
            }
        });

        jLabel1.setText("Custom Organization Scripts");

        org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel1Layout.createSequentialGroup()
                .addContainerGap(75, Short.MAX_VALUE)
                .add(makeHomePageParentButton)
                .add(91, 91, 91))
            .add(jPanel1Layout.createSequentialGroup()
                .add(157, 157, 157)
                .add(jLabel1)
                .addContainerGap(165, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel1Layout.createSequentialGroup()
                .add(56, 56, 56)
                .add(jLabel1)
                .add(31, 31, 31)
                .add(makeHomePageParentButton)
                .addContainerGap(270, Short.MAX_VALUE))
        );

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void makeHomePageParentButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_makeHomePageParentButtonActionPerformed
// TODO add your handling code here:
        (new MakeParentHomePageOrganizer()).runOrganizer();
    }//GEN-LAST:event_makeHomePageParentButtonActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new CustomOrganizationsFrame().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    protected javax.swing.JLabel jLabel1;
    protected javax.swing.JPanel jPanel1;
    protected javax.swing.JButton makeHomePageParentButton;
    // End of variables declaration//GEN-END:variables

}
